package com.longan.crm.controller;

import com.longan.common.utils.AjaxResult;
import com.longan.crm.fegin.sys.service.SysTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/crm")
public class TestController {

    @Autowired
    private SysTestService sysTestService;

    @GetMapping("/pass_feign")
    public AjaxResult passFeign() {
        System.out.println("通过feign访问到了");
        return sysTestService.test0();
    }

    @GetMapping("/not_feign")
    public AjaxResult notFeign() {
        System.out.println("不通过feign访问到了");
        return AjaxResult.success("不通过feign访问到了");
    }

    @GetMapping("/not_need_login")
    public AjaxResult notNeedLogin() {
        System.out.println("不通过login访问到了");
        return AjaxResult.success("不通过login访问到了");
    }
}
